package games.graphPath;

import java.io.FileNotFoundException;
import java.io.IOException;

public class Platform {

	public static void main(String[] args) throws IOException {
		GraphPath gp;
		GraphPathResult r = new GraphPathResult();
		
		if (args.length <1){
			gp = new GraphPath(15,0,1);
			gp.runWithAStar(r);
			gp.runWithGenetic(r);
			gp.runWithGradiant(r,15);
			r.printResults("result1.txt");
			
			gp = new GraphPath(150,0,1);
			gp.runWithAStar(r);
			gp.runWithGenetic(r);
			gp.runWithGradiant(r,150);
			r.printResults("result2.txt");
			
			gp = new GraphPath(1000,0,1);
			gp.runWithAStar(r);
			gp.runWithGenetic(r);
			gp.runWithGradiant(r,1500);
			r.printResults("result3.txt");
		}
		else
		{
			for (int i=0; i<args.length; i++)
			{
				try{
					gp = new GraphPath(args[i]);
					gp.runWithAStar(r);
					gp.runWithGenetic(r);
					gp.runWithGradiant(r,1500);
				}catch (IOException e){}
			}
		}
		
		//gp._graph.printGraph();
				
		r.printResults("results.txt");

						
	}

}

